<!DOCTYPE html>
<html ng-app="zhangJiaGang">
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <title>张家港香山景区微信门票兑换系统</title>
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="style/table-responsive.css"/>
    <link rel="stylesheet" href="style/style.css"/>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/angular.js/1.3.9/angular.min.js"></script>
    <script type="text/javascript" src="script/exchange.js"></script>
</head>
<body>

<div class="container-fluid" ng-controller="ExchangeController">
    <div class="row">
        <div class="col-md-6 col-md-offset-3 title">
            <h2>{{pageTitle}}</h2>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6 col-md-offset-3 search-box">
            <div class="form-group row">
                <div class="col-xs-10">
                    <input type="search" placeholder="请输入手机号" ng-model="phone" class="form-control"/>
                </div>
                <div class="col-xs-2">
                    <a ng-href="javascript:;" class="btn btn-primary" ng-click="search()">查询</a>
                </div>
            </div>
        </div>
    </div>
    <div class="row orderlist">
        <div class="col-md-6 col-md-offset-3 records table-responsive" id="no-more-tables">
            <table class="table table-hover table-bordered cf">
                <thead class="cf">
                <tr>
                    <th>手机号码</th>
                    <th>兑换码</th>
                    <th>创建时间</th>
                    <th>兑换</th>
                </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="r in orders">
                        <td data-title="手机号码">{{r.phone}}</td>
                        <td data-title="兑换码">{{r.redddmCode}}</td>
                        <td data-title="创建时间">{{r.createTime}}</td>
                        <td data-title="兑换" ng-show="r.status == 1"><a ng-href="javascript:;"  ng-click="exchange(r.phone,r.codeId)" class="btn btn-success">兑换</a></td>
                        <td data-title="兑换" ng-show="r.status == 2"><a href="javascript:;" class="btn btn-info">已兑换</a></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="clear-fix"></div>
    </div>

</div>


</body>
</html>